package com.dragon.modules.yuegou.query.product;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.product.CronTaskItemEntity;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.time.LocalDateTime;

/**
 * 商品库存定时任务明细表 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2022-03-21 15:02:16
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class CronTaskItemQuery extends CronTaskItemEntity implements Query<CronTaskItemEntity> {

    /** 查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 任务ID查询条件 */
	@JsonUnwrapped(prefix = "taskId")
	private Condition<String> taskIdCondition;

    /** 商品ID查询条件 */
	@JsonUnwrapped(prefix = "skuId")
	private Condition<String> skuIdCondition;

    /** 枚举]加库存方式：
1-在总库存基础上增加-BASIS、
2-总库存加至-ADD_TO查询条件 */
	@JsonUnwrapped(prefix = "addType")
	private Condition<Integer> addTypeCondition;

    /** 当前总库存查询条件 */
	@JsonUnwrapped(prefix = "nowTotal")
	private Condition<Integer> nowTotalCondition;

    /** 当前剩余库存查询条件 */
	@JsonUnwrapped(prefix = "nowSale")
	private Condition<Long> nowSaleCondition;

    /** 增加库存查询条件 */
	@JsonUnwrapped(prefix = "addStock")
	private Condition<Long> addStockCondition;

    /** 增加后总库存查询条件 */
	@JsonUnwrapped(prefix = "afterTotal")
	private Condition<Long> afterTotalCondition;

    /** 创建人ID查询条件 */
	@JsonUnwrapped(prefix = "createdBy")
	private Condition<String> createdByCondition;

    /** 创建时间查询条件 */
	@JsonUnwrapped(prefix = "createdTime")
	private Condition<LocalDateTime> createdTimeCondition;

    /** 更新人ID查询条件 */
	@JsonUnwrapped(prefix = "modifiedBy")
	private Condition<String> modifiedByCondition;

    /** 更新时间查询条件 */
	@JsonUnwrapped(prefix = "modifiedTime")
	private Condition<LocalDateTime> modifiedTimeCondition;

    /** 逻辑删除，1表示已删除,0表示未删除查询条件 */
	@JsonUnwrapped(prefix = "del")
	private Condition<Boolean> delCondition;

    /** 删除人ID查询条件 */
	@JsonUnwrapped(prefix = "delBy")
	private Condition<String> delByCondition;

    /** 删除时间查询条件 */
	@JsonUnwrapped(prefix = "delTime")
	private Condition<LocalDateTime> delTimeCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public CronTaskItemQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public CronTaskItemQuery(CronTaskItemEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public CronTaskItemQuery(CronTaskItemQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.taskIdCondition != null) {
			this.taskIdCondition = other.taskIdCondition.copy();
		}
		if(other.skuIdCondition != null) {
			this.skuIdCondition = other.skuIdCondition.copy();
		}
		if(other.addTypeCondition != null) {
			this.addTypeCondition = other.addTypeCondition.copy();
		}
		if(other.nowTotalCondition != null) {
			this.nowTotalCondition = other.nowTotalCondition.copy();
		}
		if(other.nowSaleCondition != null) {
			this.nowSaleCondition = other.nowSaleCondition.copy();
		}
		if(other.addStockCondition != null) {
			this.addStockCondition = other.addStockCondition.copy();
		}
		if(other.afterTotalCondition != null) {
			this.afterTotalCondition = other.afterTotalCondition.copy();
		}
		if(other.createdByCondition != null) {
			this.createdByCondition = other.createdByCondition.copy();
		}
		if(other.createdTimeCondition != null) {
			this.createdTimeCondition = other.createdTimeCondition.copy();
		}
		if(other.modifiedByCondition != null) {
			this.modifiedByCondition = other.modifiedByCondition.copy();
		}
		if(other.modifiedTimeCondition != null) {
			this.modifiedTimeCondition = other.modifiedTimeCondition.copy();
		}
		if(other.delCondition != null) {
			this.delCondition = other.delCondition.copy();
		}
		if(other.delByCondition != null) {
			this.delByCondition = other.delByCondition.copy();
		}
		if(other.delTimeCondition != null) {
			this.delTimeCondition = other.delTimeCondition.copy();
		}
	}

	@Override
	public QueryWrapper<CronTaskItemEntity> toQueryWrapper() {
		QueryWrapper<CronTaskItemEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (taskIdCondition != null) {
			taskIdCondition.toWrapper(wrapper, COL_TASK_ID);
		}
		if (skuIdCondition != null) {
			skuIdCondition.toWrapper(wrapper, COL_SPU_ID);
		}
		if (addTypeCondition != null) {
			addTypeCondition.toWrapper(wrapper, COL_ADD_TYPE);
		}
		if (nowTotalCondition != null) {
			nowTotalCondition.toWrapper(wrapper, COL_NOW_TOTAL);
		}
		if (nowSaleCondition != null) {
			nowSaleCondition.toWrapper(wrapper, COL_NOW_SALE);
		}
		if (addStockCondition != null) {
			addStockCondition.toWrapper(wrapper, COL_ADD_STOCK);
		}
		if (afterTotalCondition != null) {
			afterTotalCondition.toWrapper(wrapper, COL_AFTER_TOTAL);
		}
		if (createdByCondition != null) {
			createdByCondition.toWrapper(wrapper, COL_CREATED_BY);
		}
		if (createdTimeCondition != null) {
			createdTimeCondition.toWrapper(wrapper, COL_CREATED_TIME);
		}
		if (modifiedByCondition != null) {
			modifiedByCondition.toWrapper(wrapper, COL_MODIFIED_BY);
		}
		if (modifiedTimeCondition != null) {
			modifiedTimeCondition.toWrapper(wrapper, COL_MODIFIED_TIME);
		}
		if (delCondition != null) {
			delCondition.toWrapper(wrapper, COL_DEL);
		}
		if (delByCondition != null) {
			delByCondition.toWrapper(wrapper, COL_DEL_BY);
		}
		if (delTimeCondition != null) {
			delTimeCondition.toWrapper(wrapper, COL_DEL_TIME);
		}
		return wrapper;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param idCondition 查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回任务ID查询条件
	 * 
	 * @return taskIdCondition 任务ID查询条件
	 */
	public Condition<String> taskId() {
		this.taskIdCondition = new Condition<>();
		return this.taskIdCondition;
	}
	
	/**
	 * 获取任务ID查询条件
	 * 
	 * @return taskIdCondition 任务ID查询条件
	 */
	public Condition<String> getTaskIdCondition() {
		return taskIdCondition;
	}

	/**
	 * 设置任务ID查询条件
	 * 
	 * @param taskIdCondition 任务ID查询条件
	 */
	public void setTaskIdCondition(Condition<String> taskIdCondition) {
		this.taskIdCondition = taskIdCondition;
	}

	/**
	 * 构造并返回商品ID查询条件
	 * 
	 * @return skuIdCondition 商品ID查询条件
	 */
	public Condition<String> skuId() {
		this.skuIdCondition = new Condition<>();
		return this.skuIdCondition;
	}
	
	/**
	 * 获取商品ID查询条件
	 * 
	 * @return skuIdCondition 商品ID查询条件
	 */
	public Condition<String> getSkuIdCondition() {
		return skuIdCondition;
	}

	/**
	 * 设置商品ID查询条件
	 * 
	 * @param skuIdCondition 商品ID查询条件
	 */
	public void setSkuIdCondition(Condition<String> skuIdCondition) {
		this.skuIdCondition = skuIdCondition;
	}

	/**
	 * 构造并返回枚举]加库存方式：
1-在总库存基础上增加-BASIS、
2-总库存加至-ADD_TO查询条件
	 * 
	 * @return addTypeCondition 枚举]加库存方式：
1-在总库存基础上增加-BASIS、
2-总库存加至-ADD_TO查询条件
	 */
	public Condition<Integer> addType() {
		this.addTypeCondition = new Condition<>();
		return this.addTypeCondition;
	}
	
	/**
	 * 获取枚举]加库存方式：
1-在总库存基础上增加-BASIS、
2-总库存加至-ADD_TO查询条件
	 * 
	 * @return addTypeCondition 枚举]加库存方式：
1-在总库存基础上增加-BASIS、
2-总库存加至-ADD_TO查询条件
	 */
	public Condition<Integer> getAddTypeCondition() {
		return addTypeCondition;
	}

	/**
	 * 设置枚举]加库存方式：
1-在总库存基础上增加-BASIS、
2-总库存加至-ADD_TO查询条件
	 * 
	 * @param addTypeCondition 枚举]加库存方式：
1-在总库存基础上增加-BASIS、
2-总库存加至-ADD_TO查询条件
	 */
	public void setAddTypeCondition(Condition<Integer> addTypeCondition) {
		this.addTypeCondition = addTypeCondition;
	}

	/**
	 * 构造并返回当前总库存查询条件
	 * 
	 * @return nowTotalCondition 当前总库存查询条件
	 */
	public Condition<Integer> nowTotal() {
		this.nowTotalCondition = new Condition<>();
		return this.nowTotalCondition;
	}
	
	/**
	 * 获取当前总库存查询条件
	 * 
	 * @return nowTotalCondition 当前总库存查询条件
	 */
	public Condition<Integer> getNowTotalCondition() {
		return nowTotalCondition;
	}

	/**
	 * 设置当前总库存查询条件
	 * 
	 * @param nowTotalCondition 当前总库存查询条件
	 */
	public void setNowTotalCondition(Condition<Integer> nowTotalCondition) {
		this.nowTotalCondition = nowTotalCondition;
	}

	/**
	 * 构造并返回当前剩余库存查询条件
	 * 
	 * @return nowSaleCondition 当前剩余库存查询条件
	 */
	public Condition<Long> nowSale() {
		this.nowSaleCondition = new Condition<>();
		return this.nowSaleCondition;
	}
	
	/**
	 * 获取当前剩余库存查询条件
	 * 
	 * @return nowSaleCondition 当前剩余库存查询条件
	 */
	public Condition<Long> getNowSaleCondition() {
		return nowSaleCondition;
	}

	/**
	 * 设置当前剩余库存查询条件
	 * 
	 * @param nowSaleCondition 当前剩余库存查询条件
	 */
	public void setNowSaleCondition(Condition<Long> nowSaleCondition) {
		this.nowSaleCondition = nowSaleCondition;
	}

	/**
	 * 构造并返回增加库存查询条件
	 * 
	 * @return addStockCondition 增加库存查询条件
	 */
	public Condition<Long> addStock() {
		this.addStockCondition = new Condition<>();
		return this.addStockCondition;
	}
	
	/**
	 * 获取增加库存查询条件
	 * 
	 * @return addStockCondition 增加库存查询条件
	 */
	public Condition<Long> getAddStockCondition() {
		return addStockCondition;
	}

	/**
	 * 设置增加库存查询条件
	 * 
	 * @param addStockCondition 增加库存查询条件
	 */
	public void setAddStockCondition(Condition<Long> addStockCondition) {
		this.addStockCondition = addStockCondition;
	}

	/**
	 * 构造并返回增加后总库存查询条件
	 * 
	 * @return afterTotalCondition 增加后总库存查询条件
	 */
	public Condition<Long> afterTotal() {
		this.afterTotalCondition = new Condition<>();
		return this.afterTotalCondition;
	}
	
	/**
	 * 获取增加后总库存查询条件
	 * 
	 * @return afterTotalCondition 增加后总库存查询条件
	 */
	public Condition<Long> getAfterTotalCondition() {
		return afterTotalCondition;
	}

	/**
	 * 设置增加后总库存查询条件
	 * 
	 * @param afterTotalCondition 增加后总库存查询条件
	 */
	public void setAfterTotalCondition(Condition<Long> afterTotalCondition) {
		this.afterTotalCondition = afterTotalCondition;
	}

	/**
	 * 构造并返回创建人ID查询条件
	 * 
	 * @return createdByCondition 创建人ID查询条件
	 */
	public Condition<String> createdBy() {
		this.createdByCondition = new Condition<>();
		return this.createdByCondition;
	}
	
	/**
	 * 获取创建人ID查询条件
	 * 
	 * @return createdByCondition 创建人ID查询条件
	 */
	public Condition<String> getCreatedByCondition() {
		return createdByCondition;
	}

	/**
	 * 设置创建人ID查询条件
	 * 
	 * @param createdByCondition 创建人ID查询条件
	 */
	public void setCreatedByCondition(Condition<String> createdByCondition) {
		this.createdByCondition = createdByCondition;
	}

	/**
	 * 构造并返回创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> createdTime() {
		this.createdTimeCondition = new Condition<>();
		return this.createdTimeCondition;
	}
	
	/**
	 * 获取创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> getCreatedTimeCondition() {
		return createdTimeCondition;
	}

	/**
	 * 设置创建时间查询条件
	 * 
	 * @param createdTimeCondition 创建时间查询条件
	 */
	public void setCreatedTimeCondition(Condition<LocalDateTime> createdTimeCondition) {
		this.createdTimeCondition = createdTimeCondition;
	}

	/**
	 * 构造并返回更新人ID查询条件
	 * 
	 * @return modifiedByCondition 更新人ID查询条件
	 */
	public Condition<String> modifiedBy() {
		this.modifiedByCondition = new Condition<>();
		return this.modifiedByCondition;
	}
	
	/**
	 * 获取更新人ID查询条件
	 * 
	 * @return modifiedByCondition 更新人ID查询条件
	 */
	public Condition<String> getModifiedByCondition() {
		return modifiedByCondition;
	}

	/**
	 * 设置更新人ID查询条件
	 * 
	 * @param modifiedByCondition 更新人ID查询条件
	 */
	public void setModifiedByCondition(Condition<String> modifiedByCondition) {
		this.modifiedByCondition = modifiedByCondition;
	}

	/**
	 * 构造并返回更新时间查询条件
	 * 
	 * @return modifiedTimeCondition 更新时间查询条件
	 */
	public Condition<LocalDateTime> modifiedTime() {
		this.modifiedTimeCondition = new Condition<>();
		return this.modifiedTimeCondition;
	}
	
	/**
	 * 获取更新时间查询条件
	 * 
	 * @return modifiedTimeCondition 更新时间查询条件
	 */
	public Condition<LocalDateTime> getModifiedTimeCondition() {
		return modifiedTimeCondition;
	}

	/**
	 * 设置更新时间查询条件
	 * 
	 * @param modifiedTimeCondition 更新时间查询条件
	 */
	public void setModifiedTimeCondition(Condition<LocalDateTime> modifiedTimeCondition) {
		this.modifiedTimeCondition = modifiedTimeCondition;
	}

	/**
	 * 构造并返回逻辑删除，1表示已删除,0表示未删除查询条件
	 * 
	 * @return delCondition 逻辑删除，1表示已删除,0表示未删除查询条件
	 */
	public Condition<Boolean> del() {
		this.delCondition = new Condition<>();
		return this.delCondition;
	}
	
	/**
	 * 获取逻辑删除，1表示已删除,0表示未删除查询条件
	 * 
	 * @return delCondition 逻辑删除，1表示已删除,0表示未删除查询条件
	 */
	public Condition<Boolean> getDelCondition() {
		return delCondition;
	}

	/**
	 * 设置逻辑删除，1表示已删除,0表示未删除查询条件
	 * 
	 * @param delCondition 逻辑删除，1表示已删除,0表示未删除查询条件
	 */
	public void setDelCondition(Condition<Boolean> delCondition) {
		this.delCondition = delCondition;
	}

	/**
	 * 构造并返回删除人ID查询条件
	 * 
	 * @return delByCondition 删除人ID查询条件
	 */
	public Condition<String> delBy() {
		this.delByCondition = new Condition<>();
		return this.delByCondition;
	}
	
	/**
	 * 获取删除人ID查询条件
	 * 
	 * @return delByCondition 删除人ID查询条件
	 */
	public Condition<String> getDelByCondition() {
		return delByCondition;
	}

	/**
	 * 设置删除人ID查询条件
	 * 
	 * @param delByCondition 删除人ID查询条件
	 */
	public void setDelByCondition(Condition<String> delByCondition) {
		this.delByCondition = delByCondition;
	}

	/**
	 * 构造并返回删除时间查询条件
	 * 
	 * @return delTimeCondition 删除时间查询条件
	 */
	public Condition<LocalDateTime> delTime() {
		this.delTimeCondition = new Condition<>();
		return this.delTimeCondition;
	}
	
	/**
	 * 获取删除时间查询条件
	 * 
	 * @return delTimeCondition 删除时间查询条件
	 */
	public Condition<LocalDateTime> getDelTimeCondition() {
		return delTimeCondition;
	}

	/**
	 * 设置删除时间查询条件
	 * 
	 * @param delTimeCondition 删除时间查询条件
	 */
	public void setDelTimeCondition(Condition<LocalDateTime> delTimeCondition) {
		this.delTimeCondition = delTimeCondition;
	}

}
